<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- (c) 2013 J D Eisenberg -->

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Automatic rotation of animateMotion along a complex path</title>
  <link rel="stylesheet" type="text/css" href="../svg_style.css">
  <script type="text/javascript" src="../svg_utils.js"></script>
</head>

<body onload="init();">

<div id="svgInput">
<div class="editable"><pre id="svgSource" contenteditable="true"></pre></div>
<div id="svgOriginal">&lt;svg width="250" height="250"&gt;
&lt;!-- show the path along which the triangle will move --&gt;
&lt;path d="M50,125 C 100,25 150,225, 200, 125"
  style="fill: none; stroke: blue;"/&gt;

&lt;!-- Triangle to be moved along the motion path.
   It is defined with an upright orientation with the base of
   the triangle centered horizontally just above the origin. --&gt;
&lt;path d="M-10,-3 L10,-3 L0,-25z" style="fill: yellow; stroke: red;" &gt;
  &lt;animateMotion
    <span class="highlight">path="M50,125 C 100,25 150,225, 200, 125"
    rotate="auto"</span>
    dur="6s" fill="freeze"/&gt;
&lt;/path&gt;
&lt;/svg&gt;</div>
<div id="svgError"></div>
<div>
  <input type="button" value="Refresh" onclick="refresh(); reanimate();"/>
  <input type="button" value="Reset" onclick="reset(); reanimate();"/>
  <input type="checkbox" id="svgShowError" /> <!--Show SVG Errors-->
</div>
</div> <!-- svgInput-->

<div id="svgOutput">
  <svg width="250" height="250" "0 0 250 250" id="svgSvg">
    <g id="svgMarkup"></g>
  </svg>
</div>

</body>
</html>

